// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=1599
// 난이도: 최하

//#define COMPILE_P1599
#ifdef COMPILE_P1599

#include <fstream>

using namespace std;

int n;

void input() {
	ifstream in("input.txt");
	in >> n;
	in.close();
}

void solve() {

}

void output() {
	ofstream out("output.txt");
	for (int i = 1; i <= 6; i++)
		for (int j = 1; j <= 6; j++)
			if (i + j == n) {
				out << i << " " << j << "\n";
			}

	out.close();
}

int main() {
	input();
	solve();
	output();
    return 0;
}


#endif
